<?php

namespace AppBundle\Controller;

use AppBundle\Service\CustomService;
use AppBundle\Service\DefaultService;
use CourseBundle\Service\CourseService;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class DefaultController extends Controller
{

    private $custom;
    private $default;
    private $course;

    public function __construct(CustomService $customService,DefaultService $defaultService,CourseService $courseService)
    {
        $this->custom=$customService;
        $this->default=$defaultService;
        $this->course=$courseService;
    }

    /**
     * @Route("/", name="homepage")
     */
    public function indexAction(Request $request)
    {
        // replace this example code with whatever you need
        return $this->render('default/index.html.twig', [
            'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
            'services'=>[$this->custom->get(),$this->default->get(),$this->course->get()]
        ]);
    }
}
